import logging
import os


_log = logging.getLogger(__name__)


# Programmatically determine whether to turn on debug mode.  If we're running
# on the SDK, then turn on debug mode.  Otherwise we're running on the cloud,
# so turn off debug mode.  (Debug mode enables more verbose logging, but also
# makes the webapp slower.)
_SERVER_SOFTWARE = os.getenv('SERVER_SOFTWARE', '')
DEBUG = _SERVER_SOFTWARE.split('/', 1)[0] == 'Development'
_log.debug('turning %s debug mode' % ('on' if DEBUG else 'off'))


_CURRENT_PATH = os.path.dirname(__file__)
TEMPLATES = os.path.join(_CURRENT_PATH, 'templates')


ADMINS = {
    'abmorton@gmail.com': 'Adam',
}


NUM_CHAT_MESSAGES = 15
